<!-- modelList.html 2017-02-01 15:54:09-->
#@HplusLayout()
#define content()
<div style="padding:10px">
	<div id="AdvanceSearch" style="padding:15px;display: none">
		<form class="form-horizontal" novalidate="novalidate" onsubmit="return bootstrapTableRefresh()">
			<div class="form-group">
				<label class="col-xs-3 control-label">名称：</label>
				<div class="col-xs-8">
					<input type="text" class="form-control" name="name"/>
				</div>
			</div>
	    
			<div class="form-group">
				<label class="col-xs-3 control-label">代码：</label>
				<div class="col-xs-8">
					<input type="text" class="form-control" name="code"/>
				</div>
			</div>
	    
			<div class="form-group">
				<div class="col-xs-8 col-xs-offset-3">
					<button type="reset" class="btn btn-default">清空</button> <button type="submit" class="btn btn-primary">开始查询</button>
				</div>
			</div>
		</form>
	</div>
	<div id="toolbar">
		<button onclick="layer.full(layer.open({area: ['550px', '300px'],content: 'addEditModel?component_id=#(component_id)',type: 2,title: '新增模型'}))" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-plus"></i></button>
		<button onclick="layer.open({area: ['450px', 'auto'],content:$('#AdvanceSearch'),type:1,shade: false,title:'搜索'});" type="button" class="btn btn-outline btn-default"><i class="glyphicon glyphicon-search"></i></button>
		<a href="batchDeleteModel" class="btn btn-outline btn-default" target="selectedTodo" rel="btSelectItem" title="确定删除这些数据？"><i class="glyphicon glyphicon-trash"></i></a>
	</div>
	<table id="bootstrapTable" data-id-field="id" data-url="modelList?component_id=#(component_id)" data-sort-name="id" data-sort-order="desc">
		<thead>
			<tr>
				<th data-checkbox="true"></th>
				<th data-formatter="xuhaoFormatter" data-align="center" data-width="70px">序号</th>
				<th data-field="name" data-align="center">名称</th>
				<th data-field="code" data-align="center">代码</th>
				<th data-field="list_type_cn" data-align="center">列表样式</th>
				<th data-field="update_time" data-align="center" data-width="150px">更新时间</th>
				<th data-field="create_time" data-align="center" data-width="150px">创建时间</th>
				<th data-formatter="caozuoFormatter">操作</th>
			</tr>
		</thead>
	</table>
</div>
#end
#define css()
<link href="#(res_path)/hplus/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
#end
#define js()
<script src="#(res_path)/hplus/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="#(res_path)/hplus/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
#end
#define jsFunction()
<script>
	function caozuoFormatter(value,row,index){
		var str = "";
		str = str + "<a href=\"javascript:\" onclick=\"layer.full(layer.open({area: ['550px', '300px'],content: 'addEditModel?id="+row.id+"',type: 2,title: '设计模型'}))\">设计模型</a>&nbsp;&nbsp;";
		str = str + "<a href=\"javascript:\" onclick=\"layer.full(layer.open({area: ['550px', '300px'],content: 'makeCode?id="+row.id+"',type: 2,title: '生成代码'}))\">生成代码</a>  ";
		
		return str;
	}
</script>
#end
       		